from web_server_function.CourseServer import course_server
from web_server_function.ServerUtils import server_utils
from utils.ReadUtil import read_util
import argparse


def audit_main(title):
    sql = f"UPDATE `xkb_prod_backup`.`course_recommended` SET `is_show` = 1, `audit_status` = 3 WHERE `title` = '{title}'"
    server_utils.execute_sql_function(sql)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='执行审核新增学习方法操作')
    parser.add_argument('title', type=str, help='学习方法标题')
    args = parser.parse_args()

    audit_main(args.title)
